home *** CD-ROM | disk | FTP | other *** search
/ Interactive Media Design Review 1999 / Interactive Media Design Review 1999.iso / pc / Demos / Bombardier_PC / BSCRIPTS.CST / 00102_Script_simpleRollers < prev    next >
Text File  |  1999-04-25  |  2KB  |  100 lines

  1. -- ⌐ 1998 @radical.media, inc. & Concurrent New Media Group, L.L.C.
  2. -- Developed for Bombardier, Inc.
  3. --
  4. -- All programming developed by: 
  5. -- Robert Fabricant, Valerie Valoueva, Ossi Shaked, 
  6. -- Henry Sauvageot, Chris Howell & Chris Girand
  7. --
  8. -- Use of this code by parties other than @radical.media, inc. or their
  9. --agents 
  10. -- without the express written consent of @radical.media, inc. AND Concurrent 
  11. -- New Media Group, L.L.C. is strictly prohibited.
  12. ------------------------------------------------------
  13.  
  14. property mySprite, NeutralName, HiliteName, Index, frameNameRoot
  15.  
  16. on getPropertyDescriptionList
  17.   set description = [:]
  18.   addProp description, #frameNameRoot,[#format:#string,¼
  19.                                        #default:"",#comment:"enter the frame name root you wanna go to"]
  20.   return description
  21. end  
  22.  
  23.  
  24. on new me
  25.   set mySprite = the spriteNum of me
  26.   set NeutralName = getNeutralName(me, mySprite)
  27.   set HiliteName = NeutralName&"-hil"
  28.   set Index = getIndex (me)
  29. end
  30.  
  31. on getIndex me
  32.   set myString = EMPTY
  33.   repeat with i = the Number of Chars in NeutralName down to 1
  34.     set value = integer(char i of NeutralName)
  35.     if not(voidP(value)) then
  36.       set myString = myString&string(value)
  37.     else
  38.       exit repeat
  39.     end if
  40.   end repeat
  41.   
  42.   return myString
  43.   
  44. end
  45.  
  46.  
  47. on mouseEnter me
  48.   set the member of sprite mySprite = member  HiliteName
  49.   --  set the member of sprite linkedSprite = member  linkedHiliteName
  50.   puppetsound 3, "newroll"
  51. end
  52.  
  53. on mouseLeave me
  54.   set the member of sprite mySprite = member  NeutralName
  55.   --  set the member of sprite linkedSprite = member  linkedNeutralName
  56. end
  57.  
  58. on mouseUp me
  59.   --  sendAllSprites(#layoutPuppetsOff)
  60.   cursor -1
  61.   go to frame frameNameRoot&Index
  62.   puppetsound 3, "mouse5"
  63. end
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. on getNeutralName me,SpriteNum
  71.   
  72.   set aMember = the member of sprite spriteNum
  73.   set Name = the name of member aMember
  74.   if Name contains "-" then
  75.     repeat with i = the Number of Chars of Name down to 1
  76.       if char i of Name <> "-" then 
  77.         delete char i of Name
  78.       else
  79.         delete char i of Name
  80.         exit repeat
  81.       end if
  82.     end repeat
  83.   end if
  84.   
  85.   
  86.   return Name
  87.   
  88. end
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97. on layoutPuppetsOff me
  98.   puppetsprite mySprite, false
  99. end
  100.